package br.com.nautical.teste;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import br.com.nautical.persistence.model.Cliente;

public class TestePersistencia {


	public static void main(String[] args) {
		Cliente cliente = new Cliente();
		
		cliente.setNomeCliente("Gabriel Panassol");
		cliente.setEmail("gpanassol@gmail.com");
		cliente.setTipoEmail(0);
		
		EntityManagerFactory factory = Persistence.createEntityManagerFactory("email");
		EntityManager manager = factory.createEntityManager();
		manager.getTransaction().begin();
		
		manager.getTransaction().commit();
		manager.close();
		factory.close();
	}
}
